﻿<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="SupportingMaterial.ascx.cs"
    Inherits="Pantry.Web.Control.SupportingMaterial" %>
<%@ Register Namespace="SiteUtils" Assembly="CollectionPager" TagPrefix="cc1" %>

<div id="create_contact" class="g_12">
    <div class="widget_header">
        <h4 class="widget_header_title wwIcon i_16_forms" style="font-weight: bold;">
            Current List of Supporting Materials
        </h4>
        <div class="ActionListSupportingMaterial">
            <asp:Button ID="Button1" runat="server" CssClass="simple_buttons" Text="Create" />&nbsp;
            <asp:CheckBox runat="server" ID="CheckboxIsInActive" />
            <asp:Label for="CheckboxIsInActive" runat="server" Text="Include In-active" />
        </div>
    </div>
    <div class="widget_contents noPadding">
        <div class="GridviewListSupportingMaterial">
            <asp:UpdatePanel runat="server" ID="PanelListSupportingMaterial">
                <Triggers>
                    <asp:AsyncPostBackTrigger ControlID="CollectionPager" EventName="Click" />
                    <asp:AsyncPostBackTrigger ControlID="CheckboxIsInActive" EventName="CheckedChanged" />
                </Triggers>
                <ContentTemplate>
                    <div class="widget_contents noPadding">
                        <table class="tables">
                            <thead>
                                <tr>
                                    <th class="sorting">
                                        <asp:LinkButton ID="LinkSortByUrl" runat="server">URL</asp:LinkButton>
                                    </th>
                                    <th class="sorting">
                                        <asp:LinkButton ID="LinkSortByDescription" runat="server">Description</asp:LinkButton>
                                    </th>
                                    <th class="sorting">
                                        <asp:LinkButton ID="LinkSortByType" runat="server">Type</asp:LinkButton>
                                    </th>
                                    <th class="sorting">
                                        <asp:LinkButton ID="LinkSortByAddedBy" runat="server">Added By</asp:LinkButton>
                                    </th>
                                    <th class="sorting">
                                        <asp:LinkButton ID="LinkSortByAddedDate" runat="server">Added Date</asp:LinkButton>
                                    </th>
                                </tr>
                            </thead>
                            <tbody>
                                <asp:Repeater ID="RepeaterListSupportingMaterial" runat="server">
                                    <ItemTemplate>
                                        <tr>
                                            <td>
                                                <asp:LinkButton runat="server" OnClick="UrlClick"><%#Eval("Url") %></asp:LinkButton>
                                            </td>
                                            <td>
                                                <%# Eval("Description")%>
                                            </td>
                                            <td>
                                                <%# Eval("Type")%>
                                            </td>
                                            <td>
                                                <%# Eval("AddedBy")%>
                                            </td>
                                            <td>
                                                <%# Eval("AddedDate")%>
                                            </td>
                                        </tr>
                                    </ItemTemplate>
                                </asp:Repeater>
                            </tbody>
                        </table>
                        <div class="dtBottom">
                            <div class="dtInfo">
                            </div>
                            <div class="dtPagination">
                                <cc1:CollectionPager ID="CollectionPager" runat="server" HideOnSinglePage="false"
                                    BackText="Back" FirstText="First" ShowLabel="False" ShowFirstLast="False" NextText="Next"
                                    ResultsLocation="None" PageNumbersSeparator=" " PagingMode="PostBack">
                                </cc1:CollectionPager>
                            </div>
                        </div>
                    </div>
                    <asp:Panel ID="PanelPopupDetailtSupporting" Visible="false" runat="server" CssClass="">
                        <h4 class="widget_header_title wwIcon i_16_forms" style="font-weight: bold;">
                            Supporting Materials Details
                        </h4>
                        <table width="100%" border="0">
                            <tr>
                                <td class="AlignTd">
                                    URL <span style="color: Red">*</span>
                                </td>
                                <td>
                                    <asp:TextBox runat="server" ID="TextBoxEditUrl" ValidationGroup="EditGroup" />
                                </td>
                                <td class="AlignTd">
                                    Added By
                                </td>
                                <td>
                                    <asp:TextBox ID="TextBoxAddedBy" runat="server" Enabled="false"
                                        ValidationGroup="EditGroup" />
                                </td>
                            </tr>
                            <tr>
                                <td class="AlignTd">
                                    Description
                                </td>
                                <td>
                                    <asp:TextBox ID="TextBoxEditDes" runat="server" TextMode="MultiLine" Rows="5"
                                        ValidationGroup="EditGroup" />
                                </td>
                                <td class="AlignTd">
                                    Added Date
                                </td>
                                <td>
                                    <asp:TextBox ID="TextBoxAddedDate" runat="server" Enabled="false"
                                        ValidationGroup="EditGroup" />
                                </td>
                            </tr>
                            <tr>
                                <td class="AlignTd">
                                    Type
                                </td>
                                <td>
                                    <asp:DropDownList CssClass="simple_form" runat="server" ID="DropDownListEditType" ValidationGroup="EditGroup">
                                        <asp:ListItem Value="doc" Selected="True">Doc</asp:ListItem>
                                        <asp:ListItem Value="pdf">PDF</asp:ListItem>
                                        <asp:ListItem Value="excel">Excel</asp:ListItem>
                                    </asp:DropDownList>
                                </td>
                                <td></td>
                                <td>
                                    <asp:TextBox runat="server" ID="TextBoxId" Visible="false" />
                                </td>
                            </tr>
                            <tr>
                                <td>
                                </td>
                                <td>
                                    <asp:Button runat="server" Text="Save" OnClick="SaveEditClick" ValidationGroup="EditGroup" />
                                    <asp:Button runat="server" Text="Close" OnClick="CloseEditClick" />
                                </td>
                                <td>
                                </td>
                                <td>
                                </td>
                            </tr>
                        </table>
                    </asp:Panel>
                </ContentTemplate>
            </asp:UpdatePanel>
        </div>
    </div>
</div>
